package org.footito.android.adapter;

import java.util.Comparator;

import org.footito.android.data.Event;

public class ComparatorEvent<T> implements Comparator<Event> {

	@Override
	public int compare(Event object1, Event object2) {
		if (object1 == null){
			return -1;
		} else if (object2 == null){
			return 1;
		} else {
			return object2.getTimestamp().compareTo(object1.getTimestamp());
		}
	}

}
